<script lang="ts" setup>
import { ref } from 'vue'
import { Search } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router'

const router = useRouter()
const status = ref()
const input = ref('')

const onAddTest = () => {
  router.push('/article/test/add')
}
</script>

<template>
  <!-- <el-card style="max-width: 100%">
        <div class="tab">
            <el-button type="primary">新建试卷</el-button>

            <div style="float: right">
                <el-input v-model="input" style="width: 100px; margin-right: 10px" placeholder="搜索"
                    :suffix-icon="Search" clearable />
                <el-select v-model="status" style="width: 120px" placeholder="试卷状态" clearable>
                    
                    <el-option key="1" label="未发布" />
                </el-select>
            </div>
        </div>

        <p v-for="o in 4" :key="o" class="text item">{{ 'List item ' + o }}</p>
        
    </el-card> -->

  <div style="width: 100%; height: 100%; background-color: white">
    <div class="tab">
      <el-button type="primary" @click="onAddTest()">新建试卷</el-button>

      <div style="float: right">
        <el-input
          v-model="input"
          style="width: 100px; margin-right: 10px"
          placeholder="搜索"
          :suffix-icon="Search"
          clearable
        />
        <el-select v-model="status" style="width: 120px" placeholder="试卷状态" clearable>
          <el-option key="1" label="未发布" />
        </el-select>
      </div>
    </div>
  </div>
</template>

<style scoped>
.tab {
  box-shadow: 0px 3px 6px 0px rgba(51, 51, 51, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  margin-bottom: 0;
  padding: 0px 16px 0 40px;
  padding: 0 16px;
}
</style>
